import 'dart:convert';

import 'package:flutter/material.dart';
import 'package:flutter_demo/chapter13-Internationalization/language/ProxyLocalizations.dart';
import 'package:flutter_demo/chapter13-Internationalization/language/LocalizationsResource.dart';
import 'package:flutter_localizations/flutter_localizations.dart';

void main() {
  runApp(MaterialApp(localizationsDelegates: [
    GlobalMaterialLocalizations.delegate,
    GlobalWidgetsLocalizations.delegate,
    ProxyLocalizations(),
  ],
    home: Scaffold(
      appBar: AppBar(
        title: Builder(builder: (context){
          return Text(LocalizationsResource.of(context)!.title);
        })
      )
  ),
  ));
}
